<%--
  Created by IntelliJ IDEA.
  User: aming
  Date: 2023-07-12
  Time: 14:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <br>

    <a href="${pageContext.request.contextPath}/addUser.jsp">添加用户</a>

    <hr>

    <table border="1" width="80%">
        <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>年龄</th>
            <th>地址</th>
            <th>qq号</th>
            <th>邮箱</th>
            <th>生日</th>
            <th>操作</th>
        </tr>

        <c:forEach var="user" items="${users}" varStatus="status">
            <tr>
                <td>${status.count}</td>
                <td>${user.name}</td>
                <td>${user.gender}</td>
                <td>${user.age}</td>
                <td>${user.address}</td>
                <td>${user.qq}</td>
                <td>${user.email}</td>
                <td>${user.birStr}</td>
                <td>
                    <a href="${pageContext.request.contextPath}/user?action=findOne&id=${user.id}">编辑</a> &nbsp;&nbsp;
                    <a href="${pageContext.request.contextPath}/user?action=del&id=${user.id}">删除</a>
                </td>
            </tr>
        </c:forEach>
    </table>
</body>
</html>
